#include<iostream>
using namespace std;

int n;
int a,b;
double x;
double y;

int main()
{
	cin >> n;
	cin >> a >> b;
	x = b * 1.0 / a;
	for(int i = 1; i < n;i++)
	{
		cin >> a >> b;
		y = b * 1.0 / a;
		if(y - x > 0.05)
		{
			cout << "better" << endl;
		}
		else if(x - y > 0.05)
		{
			cout << "worse" << endl;
		}
		else
		{
			cout << "same" << endl;
		}
	}
	return 0;
}
